<h2>Relaties</h2>
<h3>Overzicht</h3>
<p><a href="<?=APPLICATION_STARTURL?>/relation/new">Nieuwe Relatie</a></p>



<table cellpadding="2" border="1" bordercolor="silver" cellspacing="0" class="edit-table">
	<tr>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'debtornumber'));?>">
				Klantnr
			</a>
		</th>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'accountnumber'));?>">
				Facnr
			</a>
		</th>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'lastname'));?>">
				Achternaam
			</a>
		</th>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'address'));?>">
				Adres
			</a>
		</th>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'city'));?>">
				Plaats
			</a>
		</th>
		<th>
			<a href="<?=$this->url(array('action' => 'index','sort' => 'emailaddress'));?>">
				Email
			</a>
		</th>
		<th>
			Soort
		</th>
		<th>
			Refo
		</th>
		<th>
			Aanvraag
		</th>
		<th>Acties</th>
	</tr>
	<? foreach($this->relations as $relation) : ?>
	<tr>
		<td><?= $relation->relation_debtornumber ?>&nbsp;</td>
		<td><?= $relation->relation_billnumber ?>&nbsp;</td>
		<td><?= $relation->relation_lastname ?>, <?=trim($relation->relation_initials . ' ' . $relation->relation_junction) ?>&nbsp;</td>
		<td><?= $relation->relation_street . ' '. trim($relation->relation_housenumber. ' ' . $relation->relation_housenumber_addition) ?>&nbsp;</td>
		<td><?= $relation->relation_city ?>&nbsp;</td>
		<td><?= $relation->relation_emailaddress ?>&nbsp;</td>
		<td><?= $relation->relation_meta->relationmeta_sortrelation ?>&nbsp;</td>
		<td><?= $relation->relation_meta->relationmeta_refo ?>&nbsp;</td>
		<td><?= $relation->relation_meta->relationmeta_sortrequest ?>&nbsp;</td>
		<td><a href="<?=APPLICATION_STARTURL?>/relation/edit/relation_id/<?=$relation->relation_id?>"><img src="<?=APPLICATION_STARTURL?>/general/icons/wrench.png" style="border: 0px;"/></a>&nbsp;
		<a href="<?=APPLICATION_STARTURL?>/relation/delete/relation_id/<?=$relation->relation_id?>"><img src="<?=APPLICATION_STARTURL?>/general/icons/delete.png" style="border: 0px;"/></a>&nbsp;</td>
	</tr>
	<? endforeach;?>
</table>

